Skip to content

Conversation

@larouxn
Copy link

@larouxn larouxn commented Jan 16, 2026

Motivation

Came across this gem "minitest", "< 6.0" lock in Gemfile and decided to remove it because Rails has since added support for Minitest 6 in Rails 8.1.2 which we upgraded to in #2487. Even Rails 8.0.x now supports Minitest 6 but currently only in 8-0-stable branch as there hasn't been a release yet, hence the conditional.

Follow up to #2458

References

Implementation

Deleted Minitest version lock and then bundle update minitest --conservative. ᕕ( ᐛ )ᕗ

Tests 🎩

Hit some errors. Maybe flake or perhaps an issue with my machine. Would like to see in CI.

image

@larouxn larouxn requested a review from a team as a code owner January 16, 2026 16:34
@larouxn larouxn force-pushed the upgrade_to_minitest_6 branch from 0c15ef8 to 8ac2f62 Compare January 16, 2026 23:05
@larouxn larouxn changed the title Upgrade minitest 5.27.0 to minitest 6.0.1 and Rails from 8.1.1 to 8.1.2 to pick up support for the former Upgrade minitest 5.27.0 to minitest 6.0.1 Jan 16, 2026
@larouxn larouxn marked this pull request as draft January 16, 2026 23:19
@larouxn

This comment was marked as resolved.

This upgrade is now possible because Rails 8.1.2 added support for Minitest 6. Even Rails 8.0.x now supports Minitest 6 but currently only in 8-0-stable branch as there hasn't been a release yet.
@larouxn larouxn force-pushed the upgrade_to_minitest_6 branch from 8ac2f62 to 7dd6821 Compare January 16, 2026 23:25
@larouxn larouxn changed the title Upgrade minitest 5.27.0 to minitest 6.0.1 Upgrade minitest 5.27.0 to minitest 6.0.1 for Rails 8.1.2 Jan 16, 2026
@larouxn larouxn marked this pull request as ready for review January 16, 2026 23:26
@larouxn larouxn changed the title Upgrade minitest 5.27.0 to minitest 6.0.1 for Rails 8.1.2 Upgrade from minitest 5.27.0 to minitest 6.0.1 for Rails 8.1.2 Jan 16, 2026
@larouxn larouxn changed the title Upgrade from minitest 5.27.0 to minitest 6.0.1 for Rails 8.1.2 Upgrade from minitest 5.27.0 to minitest 6.0.1 for Rails 8.1 Jan 17, 2026
@larouxn
Copy link
Author

larouxn commented Jan 19, 2026

Thanks for the CI run! Looking into the remaining failures, apparently only with Rails 8.1 (current). 🤔
image

- Add minitest-mock gem as it was split out from minitest core in minitest 6
- Update spec_helper.rb to conditionally require minitest/mock only for minitest 6 and above
- Update spec_helper.rb to not require minitest-reporters for minitest 6 as it doesn't support minitest 6 yet
@larouxn larouxn changed the title Upgrade from minitest 5.27.0 to minitest 6.0.1 for Rails 8.1 Upgrade minitest from 5.27.0 to 6.0.1 for supported Rails (8.1, main) Jan 20, 2026
@larouxn
Copy link
Author

larouxn commented Jan 20, 2026

Alrighty, I have some fixes for minitest 6 compatibility (e6f0167). Tested locally and only the protobuf spec fails, same 12 failures on both Rails 8.1 and Rails 8.0, and all other tests pass so likely cause is my machine. Additionally ran this branch through CI on my fork and everything passed, aside from 3 failures and 1 error on Rails main for all Ruby versions (example) re: Rails main being a moving target. (quick fix for reference)

That said, ideally we wouldn't need so many conditionals. If we want to wait for the following so we don't, that's fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant